<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::octree::ColorCoding&lt; PointT &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1octree_1_1_color_coding.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="#pro-static-attribs">静态 Protected 属性</a> &#124;
<a href="#pri-types">Private 类型</a> &#124;
<a href="classpcl_1_1octree_1_1_color_coding-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::octree::ColorCoding&lt; PointT &gt; 模板类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><b><a class="el" href="classpcl_1_1octree_1_1_color_coding.html" title="ColorCoding class">ColorCoding</a></b> class  
 <a href="classpcl_1_1octree_1_1_color_coding.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="color__coding_8h_source.html">color_coding.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a90e70dcf438d325abdcf593c9a363527"><td class="memItemLeft" align="right" valign="top"><a id="a90e70dcf438d325abdcf593c9a363527"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a90e70dcf438d325abdcf593c9a363527">ColorCoding</a> ()</td></tr>
<tr class="memdesc:a90e70dcf438d325abdcf593c9a363527"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a90e70dcf438d325abdcf593c9a363527"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87cd5c92ec1e6cb65d822f9ec94d3ee6"><td class="memItemLeft" align="right" valign="top"><a id="a87cd5c92ec1e6cb65d822f9ec94d3ee6"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a87cd5c92ec1e6cb65d822f9ec94d3ee6">~ColorCoding</a> ()</td></tr>
<tr class="memdesc:a87cd5c92ec1e6cb65d822f9ec94d3ee6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty class constructor. <br /></td></tr>
<tr class="separator:a87cd5c92ec1e6cb65d822f9ec94d3ee6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9e6aec6eefe3d829e88e74c583bbee7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#ad9e6aec6eefe3d829e88e74c583bbee7">setBitDepth</a> (unsigned char bitDepth_arg)</td></tr>
<tr class="memdesc:ad9e6aec6eefe3d829e88e74c583bbee7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Define color bit depth of encoded color information.  <a href="classpcl_1_1octree_1_1_color_coding.html#ad9e6aec6eefe3d829e88e74c583bbee7">更多...</a><br /></td></tr>
<tr class="separator:ad9e6aec6eefe3d829e88e74c583bbee7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d21490cbca034aa34955d057ad6aa4e"><td class="memItemLeft" align="right" valign="top">unsigned char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a8d21490cbca034aa34955d057ad6aa4e">getBitDepth</a> ()</td></tr>
<tr class="memdesc:a8d21490cbca034aa34955d057ad6aa4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve color bit depth of encoded color information.  <a href="classpcl_1_1octree_1_1_color_coding.html#a8d21490cbca034aa34955d057ad6aa4e">更多...</a><br /></td></tr>
<tr class="separator:a8d21490cbca034aa34955d057ad6aa4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d0ecbbb1c331d4f234b496567c4952d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a9d0ecbbb1c331d4f234b496567c4952d">setVoxelCount</a> (unsigned int voxelCount_arg)</td></tr>
<tr class="memdesc:a9d0ecbbb1c331d4f234b496567c4952d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set amount of voxels containing point color information and reserve memory  <a href="classpcl_1_1octree_1_1_color_coding.html#a9d0ecbbb1c331d4f234b496567c4952d">更多...</a><br /></td></tr>
<tr class="separator:a9d0ecbbb1c331d4f234b496567c4952d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7a2fb98dd7f14d54685a875a5cd844e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#af7a2fb98dd7f14d54685a875a5cd844e">setPointCount</a> (unsigned int pointCount_arg)</td></tr>
<tr class="memdesc:af7a2fb98dd7f14d54685a875a5cd844e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set amount of points within point cloud to be encoded and reserve memory  <a href="classpcl_1_1octree_1_1_color_coding.html#af7a2fb98dd7f14d54685a875a5cd844e">更多...</a><br /></td></tr>
<tr class="separator:af7a2fb98dd7f14d54685a875a5cd844e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69143b53e397123d1a1eab022df6271c"><td class="memItemLeft" align="right" valign="top"><a id="a69143b53e397123d1a1eab022df6271c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a69143b53e397123d1a1eab022df6271c">initializeEncoding</a> ()</td></tr>
<tr class="memdesc:a69143b53e397123d1a1eab022df6271c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize encoding of color information <br /></td></tr>
<tr class="separator:a69143b53e397123d1a1eab022df6271c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a9ceaa78233615d3ea0f961446a1afa"><td class="memItemLeft" align="right" valign="top"><a id="a2a9ceaa78233615d3ea0f961446a1afa"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a2a9ceaa78233615d3ea0f961446a1afa">initializeDecoding</a> ()</td></tr>
<tr class="memdesc:a2a9ceaa78233615d3ea0f961446a1afa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize decoding of color information <br /></td></tr>
<tr class="separator:a2a9ceaa78233615d3ea0f961446a1afa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f82048f6e4989eca5808a56c41f8f3e"><td class="memItemLeft" align="right" valign="top"><a id="a1f82048f6e4989eca5808a56c41f8f3e"></a>
std::vector&lt; char &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a1f82048f6e4989eca5808a56c41f8f3e">getAverageDataVector</a> ()</td></tr>
<tr class="memdesc:a1f82048f6e4989eca5808a56c41f8f3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get reference to vector containing averaged color data <br /></td></tr>
<tr class="separator:a1f82048f6e4989eca5808a56c41f8f3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90fae26d4e9ff946155b589a7e135d15"><td class="memItemLeft" align="right" valign="top"><a id="a90fae26d4e9ff946155b589a7e135d15"></a>
std::vector&lt; char &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a90fae26d4e9ff946155b589a7e135d15">getDifferentialDataVector</a> ()</td></tr>
<tr class="memdesc:a90fae26d4e9ff946155b589a7e135d15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get reference to vector containing differential color data <br /></td></tr>
<tr class="separator:a90fae26d4e9ff946155b589a7e135d15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a189d9b4bd5278eb3d8ad749be83c321b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a189d9b4bd5278eb3d8ad749be83c321b">encodeAverageOfPoints</a> (const typename std::vector&lt; int &gt; &amp;indexVector_arg, unsigned char rgba_offset_arg, PointCloudConstPtr inputCloud_arg)</td></tr>
<tr class="memdesc:a189d9b4bd5278eb3d8ad749be83c321b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode averaged color information for a subset of points from point cloud  <a href="classpcl_1_1octree_1_1_color_coding.html#a189d9b4bd5278eb3d8ad749be83c321b">更多...</a><br /></td></tr>
<tr class="separator:a189d9b4bd5278eb3d8ad749be83c321b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f2bd3d4d25a13b4398aa9a531537315"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a5f2bd3d4d25a13b4398aa9a531537315">encodePoints</a> (const typename std::vector&lt; int &gt; &amp;indexVector_arg, unsigned char rgba_offset_arg, PointCloudConstPtr inputCloud_arg)</td></tr>
<tr class="memdesc:a5f2bd3d4d25a13b4398aa9a531537315"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode color information of a subset of points from point cloud  <a href="classpcl_1_1octree_1_1_color_coding.html#a5f2bd3d4d25a13b4398aa9a531537315">更多...</a><br /></td></tr>
<tr class="separator:a5f2bd3d4d25a13b4398aa9a531537315"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68499431c359b2b1c35d51d078d94be7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a68499431c359b2b1c35d51d078d94be7">decodePoints</a> (PointCloudPtr outputCloud_arg, std::size_t beginIdx_arg, std::size_t endIdx_arg, unsigned char rgba_offset_arg)</td></tr>
<tr class="memdesc:a68499431c359b2b1c35d51d078d94be7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode color information  <a href="classpcl_1_1octree_1_1_color_coding.html#a68499431c359b2b1c35d51d078d94be7">更多...</a><br /></td></tr>
<tr class="separator:a68499431c359b2b1c35d51d078d94be7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ec264bd32330ee64434dc19061f0c35"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a2ec264bd32330ee64434dc19061f0c35">setDefaultColor</a> (PointCloudPtr outputCloud_arg, std::size_t beginIdx_arg, std::size_t endIdx_arg, unsigned char rgba_offset_arg)</td></tr>
<tr class="memdesc:a2ec264bd32330ee64434dc19061f0c35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set default color to points  <a href="classpcl_1_1octree_1_1_color_coding.html#a2ec264bd32330ee64434dc19061f0c35">更多...</a><br /></td></tr>
<tr class="separator:a2ec264bd32330ee64434dc19061f0c35"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:afce849e868204bf1eb14e9397e2e97e7"><td class="memItemLeft" align="right" valign="top"><a id="afce849e868204bf1eb14e9397e2e97e7"></a>
PointCloudPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#afce849e868204bf1eb14e9397e2e97e7">output_</a></td></tr>
<tr class="memdesc:afce849e868204bf1eb14e9397e2e97e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to output point cloud dataset. <br /></td></tr>
<tr class="separator:afce849e868204bf1eb14e9397e2e97e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f325d7e0945c48a24a517f1593007e6"><td class="memItemLeft" align="right" valign="top"><a id="a4f325d7e0945c48a24a517f1593007e6"></a>
std::vector&lt; char &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a4f325d7e0945c48a24a517f1593007e6">pointAvgColorDataVector_</a></td></tr>
<tr class="memdesc:a4f325d7e0945c48a24a517f1593007e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vector for storing average color information <br  />
 <br /></td></tr>
<tr class="separator:a4f325d7e0945c48a24a517f1593007e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c862e3aaad667738dfa82342b757a58"><td class="memItemLeft" align="right" valign="top"><a id="a5c862e3aaad667738dfa82342b757a58"></a>
std::vector&lt; char &gt;::const_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a5c862e3aaad667738dfa82342b757a58">pointAvgColorDataVector_Iterator_</a></td></tr>
<tr class="memdesc:a5c862e3aaad667738dfa82342b757a58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterator on average color information vector <br /></td></tr>
<tr class="separator:a5c862e3aaad667738dfa82342b757a58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36b41d2a0802b6a6329950f942a712d4"><td class="memItemLeft" align="right" valign="top"><a id="a36b41d2a0802b6a6329950f942a712d4"></a>
std::vector&lt; char &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a36b41d2a0802b6a6329950f942a712d4">pointDiffColorDataVector_</a></td></tr>
<tr class="memdesc:a36b41d2a0802b6a6329950f942a712d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vector for storing differential color information <br  />
 <br /></td></tr>
<tr class="separator:a36b41d2a0802b6a6329950f942a712d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c1076cd4ef774e22385fee51493a79e"><td class="memItemLeft" align="right" valign="top"><a id="a9c1076cd4ef774e22385fee51493a79e"></a>
std::vector&lt; char &gt;::const_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a9c1076cd4ef774e22385fee51493a79e">pointDiffColorDataVector_Iterator_</a></td></tr>
<tr class="memdesc:a9c1076cd4ef774e22385fee51493a79e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterator on differential color information vector <br /></td></tr>
<tr class="separator:a9c1076cd4ef774e22385fee51493a79e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88e357725f69e7e8428869148667e3e3"><td class="memItemLeft" align="right" valign="top"><a id="a88e357725f69e7e8428869148667e3e3"></a>
unsigned char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a></td></tr>
<tr class="memdesc:a88e357725f69e7e8428869148667e3e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Amount of bits to be removed from color components before encoding <br /></td></tr>
<tr class="separator:a88e357725f69e7e8428869148667e3e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-attribs"></a>
静态 Protected 属性</h2></td></tr>
<tr class="memitem:aa9c009058b32bdac78ca7e6e5ff41d76"><td class="memItemLeft" align="right" valign="top">static const int&#160;</td><td class="memItemRight" valign="bottom"><b>defaultColor_</b></td></tr>
<tr class="separator:aa9c009058b32bdac78ca7e6e5ff41d76"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-types"></a>
Private 类型</h2></td></tr>
<tr class="memitem:a7503a3c221d0616cd3504cec228712c3"><td class="memItemLeft" align="right" valign="top"><a id="a7503a3c221d0616cd3504cec228712c3"></a>
typedef <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloud</b></td></tr>
<tr class="separator:a7503a3c221d0616cd3504cec228712c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9deb7c4d8c795969ad42eb885e34aa85"><td class="memItemLeft" align="right" valign="top"><a id="a9deb7c4d8c795969ad42eb885e34aa85"></a>
typedef boost::shared_ptr&lt; <a class="el" href="classpcl_1_1_point_cloud.html">PointCloud</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudPtr</b></td></tr>
<tr class="separator:a9deb7c4d8c795969ad42eb885e34aa85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1b2e9c20dd174462b57f896bb011093"><td class="memItemLeft" align="right" valign="top"><a id="ad1b2e9c20dd174462b57f896bb011093"></a>
typedef boost::shared_ptr&lt; const <a class="el" href="classpcl_1_1_point_cloud.html">PointCloud</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudConstPtr</b></td></tr>
<tr class="separator:ad1b2e9c20dd174462b57f896bb011093"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;typename PointT&gt;<br />
class pcl::octree::ColorCoding&lt; PointT &gt;</h3>

<p><b><a class="el" href="classpcl_1_1octree_1_1_color_coding.html" title="ColorCoding class">ColorCoding</a></b> class </p>
<dl class="section note"><dt>注解</dt><dd>This class encodes 8-bit color information for octree-based point cloud compression. </dd>
<dd>
</dd>
<dd>
typename: PointT: type of point used in pointcloud </dd></dl>
<dl class="section author"><dt>作者</dt><dd>Julius Kammerl (<a href="#" onclick="location.href='mai'+'lto:'+'jul'+'iu'+'s@k'+'am'+'mer'+'l.'+'de'; return false;">juliu<span style="display: none;">.nosp@m.</span>s@ka<span style="display: none;">.nosp@m.</span>mmerl<span style="display: none;">.nosp@m.</span>.de</a>) </dd></dl>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a68499431c359b2b1c35d51d078d94be7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a68499431c359b2b1c35d51d078d94be7">&#9670;&nbsp;</a></span>decodePoints()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1octree_1_1_color_coding.html">pcl::octree::ColorCoding</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::decodePoints </td>
          <td>(</td>
          <td class="paramtype">PointCloudPtr&#160;</td>
          <td class="paramname"><em>outputCloud_arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>beginIdx_arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>endIdx_arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>rgba_offset_arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Decode color information </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">outputCloud_arg</td><td>output point cloud </td></tr>
    <tr><td class="paramname">beginIdx_arg</td><td>index indicating first point to be assiged with color information </td></tr>
    <tr><td class="paramname">endIdx_arg</td><td>index indicating last point to be assiged with color information </td></tr>
    <tr><td class="paramname">rgba_offset_arg</td><td>offset to color information </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;        {</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;          std::size_t i;</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;          <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pointCount;</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;          <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> colorInt;</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160; </div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;          assert (beginIdx_arg &lt;= endIdx_arg);</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160; </div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;          <span class="comment">// amount of points to be decoded</span></div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;          pointCount = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">&gt;</span> (endIdx_arg - beginIdx_arg);</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160; </div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;          <span class="comment">// get averaged color information for current voxel</span></div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;          <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> avgRed = *(<a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a5c862e3aaad667738dfa82342b757a58">pointAvgColorDataVector_Iterator_</a>++);</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;          <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> avgGreen = *(<a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a5c862e3aaad667738dfa82342b757a58">pointAvgColorDataVector_Iterator_</a>++);</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;          <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> avgBlue = *(<a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a5c862e3aaad667738dfa82342b757a58">pointAvgColorDataVector_Iterator_</a>++);</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160; </div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;          <span class="comment">// invert bit shifts during encoding</span></div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;          avgRed = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (avgRed &lt;&lt; <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>);</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;          avgGreen = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (avgGreen &lt;&lt; <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>);</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;          avgBlue = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (avgBlue &lt;&lt; <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>);</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160; </div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;          <span class="comment">// iterate over points</span></div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;          <span class="keywordflow">for</span> (i = 0; i &lt; pointCount; i++)</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;          {</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;            <span class="keywordflow">if</span> (pointCount &gt; 1)</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;            {</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;              <span class="comment">// get differential color information from input vector</span></div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;              <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> diffRed   = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (*(<a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a9c1076cd4ef774e22385fee51493a79e">pointDiffColorDataVector_Iterator_</a>++));</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;              <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> diffGreen = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (*(<a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a9c1076cd4ef774e22385fee51493a79e">pointDiffColorDataVector_Iterator_</a>++));</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;              <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> diffBlue  = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (*(<a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a9c1076cd4ef774e22385fee51493a79e">pointDiffColorDataVector_Iterator_</a>++));</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160; </div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;              <span class="comment">// invert bit shifts during encoding</span></div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;              diffRed = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (diffRed &lt;&lt; <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>);</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;              diffGreen = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (diffGreen &lt;&lt; <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>);</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;              diffBlue = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (diffBlue &lt;&lt; <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>);</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160; </div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;              <span class="comment">// decode color information</span></div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;              colorInt = ((avgRed ^ diffRed) &lt;&lt; 0) |</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;                         ((avgGreen ^ diffGreen) &lt;&lt; 8) |</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;                         ((avgBlue ^ diffBlue) &lt;&lt; 16);</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;            }</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;            {</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;              <span class="comment">// decode color information</span></div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;              colorInt = (avgRed &lt;&lt; 0) | (avgGreen &lt;&lt; 8) | (avgBlue &lt;&lt; 16);</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;            }</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160; </div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;            <span class="keywordtype">char</span>* idxPointPtr = <span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">char</span>*<span class="keyword">&gt;</span> (&amp;outputCloud_arg-&gt;points[beginIdx_arg + i]);</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;            <span class="keywordtype">int</span>&amp; pointColor = *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">int</span>*<span class="keyword">&gt;</span> (idxPointPtr+rgba_offset_arg);</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;            <span class="comment">// assign color to point from point cloud</span></div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;            pointColor=colorInt;</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;          }</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;        }</div>
<div class="ttc" id="aclasspcl_1_1octree_1_1_color_coding_html_a5c862e3aaad667738dfa82342b757a58"><div class="ttname"><a href="classpcl_1_1octree_1_1_color_coding.html#a5c862e3aaad667738dfa82342b757a58">pcl::octree::ColorCoding::pointAvgColorDataVector_Iterator_</a></div><div class="ttdeci">std::vector&lt; char &gt;::const_iterator pointAvgColorDataVector_Iterator_</div><div class="ttdoc">Iterator on average color information vector</div><div class="ttdef"><b>Definition:</b> color_coding.h:393</div></div>
<div class="ttc" id="aclasspcl_1_1octree_1_1_color_coding_html_a88e357725f69e7e8428869148667e3e3"><div class="ttname"><a href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">pcl::octree::ColorCoding::colorBitReduction_</a></div><div class="ttdeci">unsigned char colorBitReduction_</div><div class="ttdoc">Amount of bits to be removed from color components before encoding</div><div class="ttdef"><b>Definition:</b> color_coding.h:402</div></div>
<div class="ttc" id="aclasspcl_1_1octree_1_1_color_coding_html_a9c1076cd4ef774e22385fee51493a79e"><div class="ttname"><a href="classpcl_1_1octree_1_1_color_coding.html#a9c1076cd4ef774e22385fee51493a79e">pcl::octree::ColorCoding::pointDiffColorDataVector_Iterator_</a></div><div class="ttdeci">std::vector&lt; char &gt;::const_iterator pointDiffColorDataVector_Iterator_</div><div class="ttdoc">Iterator on differential color information vector</div><div class="ttdef"><b>Definition:</b> color_coding.h:399</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a189d9b4bd5278eb3d8ad749be83c321b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a189d9b4bd5278eb3d8ad749be83c321b">&#9670;&nbsp;</a></span>encodeAverageOfPoints()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1octree_1_1_color_coding.html">pcl::octree::ColorCoding</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::encodeAverageOfPoints </td>
          <td>(</td>
          <td class="paramtype">const typename std::vector&lt; int &gt; &amp;&#160;</td>
          <td class="paramname"><em>indexVector_arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>rgba_offset_arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PointCloudConstPtr&#160;</td>
          <td class="paramname"><em>inputCloud_arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Encode averaged color information for a subset of points from point cloud </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">indexVector_arg</td><td>indices defining a subset of points from points cloud </td></tr>
    <tr><td class="paramname">rgba_offset_arg</td><td>offset to color information </td></tr>
    <tr><td class="paramname">inputCloud_arg</td><td>input point cloud </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        {</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;          std::size_t i, len;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160; </div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;          <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> avgRed;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;          <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> avgGreen;</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;          <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> avgBlue;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160; </div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;          <span class="comment">// initialize</span></div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;          avgRed = avgGreen = avgBlue = 0;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160; </div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;          <span class="comment">// iterate over points</span></div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;          len = indexVector_arg.size ();</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;          <span class="keywordflow">for</span> (i = 0; i &lt; len; i++)</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;          {</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;            <span class="comment">// get color information from points</span></div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; idx = indexVector_arg[i];</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">char</span>* idxPointPtr = <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><span class="keywordtype">char</span>*<span class="keyword">&gt;</span> (&amp;inputCloud_arg-&gt;points[idx]);</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; colorInt = *<span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><span class="keywordtype">int</span>*<span class="keyword">&gt;</span> (idxPointPtr+rgba_offset_arg);</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160; </div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;            <span class="comment">// add color information</span></div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;            avgRed += (colorInt &gt;&gt; 0) &amp; 0xFF;</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;            avgGreen += (colorInt &gt;&gt; 8) &amp; 0xFF;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;            avgBlue += (colorInt &gt;&gt; 16) &amp; 0xFF;</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160; </div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;          }</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160; </div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;          <span class="comment">// calculated average color information</span></div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;          <span class="keywordflow">if</span> (len &gt; 1)</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;          {</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;            avgRed   /= <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">&gt;</span> (len);</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;            avgGreen /= <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">&gt;</span> (len);</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;            avgBlue  /= <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">&gt;</span> (len);</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;          }</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160; </div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;          <span class="comment">// remove least significant bits</span></div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;          avgRed &gt;&gt;= <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>;</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;          avgGreen &gt;&gt;= <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;          avgBlue &gt;&gt;= <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>;</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160; </div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;          <span class="comment">// add to average color vector</span></div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;          <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a4f325d7e0945c48a24a517f1593007e6">pointAvgColorDataVector_</a>.push_back (<span class="keyword">static_cast&lt;</span><span class="keywordtype">char</span><span class="keyword">&gt;</span> (avgRed));</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;          <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a4f325d7e0945c48a24a517f1593007e6">pointAvgColorDataVector_</a>.push_back (<span class="keyword">static_cast&lt;</span><span class="keywordtype">char</span><span class="keyword">&gt;</span> (avgGreen));</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;          <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a4f325d7e0945c48a24a517f1593007e6">pointAvgColorDataVector_</a>.push_back (<span class="keyword">static_cast&lt;</span><span class="keywordtype">char</span><span class="keyword">&gt;</span> (avgBlue));</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        }</div>
<div class="ttc" id="aclasspcl_1_1octree_1_1_color_coding_html_a4f325d7e0945c48a24a517f1593007e6"><div class="ttname"><a href="classpcl_1_1octree_1_1_color_coding.html#a4f325d7e0945c48a24a517f1593007e6">pcl::octree::ColorCoding::pointAvgColorDataVector_</a></div><div class="ttdeci">std::vector&lt; char &gt; pointAvgColorDataVector_</div><div class="ttdoc">Vector for storing average color information</div><div class="ttdef"><b>Definition:</b> color_coding.h:390</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a5f2bd3d4d25a13b4398aa9a531537315"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f2bd3d4d25a13b4398aa9a531537315">&#9670;&nbsp;</a></span>encodePoints()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1octree_1_1_color_coding.html">pcl::octree::ColorCoding</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::encodePoints </td>
          <td>(</td>
          <td class="paramtype">const typename std::vector&lt; int &gt; &amp;&#160;</td>
          <td class="paramname"><em>indexVector_arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>rgba_offset_arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PointCloudConstPtr&#160;</td>
          <td class="paramname"><em>inputCloud_arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Encode color information of a subset of points from point cloud </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">indexVector_arg</td><td>indices defining a subset of points from points cloud </td></tr>
    <tr><td class="paramname">rgba_offset_arg</td><td>offset to color information </td></tr>
    <tr><td class="paramname">inputCloud_arg</td><td>input point cloud </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        {</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;          std::size_t i, len;</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160; </div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;          <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> avgRed;</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;          <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> avgGreen;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;          <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> avgBlue;</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160; </div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;          <span class="comment">// initialize</span></div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;          avgRed = avgGreen = avgBlue = 0;</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160; </div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;          <span class="comment">// iterate over points</span></div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;          len = indexVector_arg.size ();</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;          <span class="keywordflow">for</span> (i = 0; i &lt; len; i++)</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;          {</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;            <span class="comment">// get color information from point</span></div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; idx = indexVector_arg[i];</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">char</span>* idxPointPtr = <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><span class="keywordtype">char</span>*<span class="keyword">&gt;</span> (&amp;inputCloud_arg-&gt;points[idx]);</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; colorInt = *<span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><span class="keywordtype">int</span>*<span class="keyword">&gt;</span> (idxPointPtr+rgba_offset_arg);</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160; </div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;            <span class="comment">// add color information</span></div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;            avgRed += (colorInt &gt;&gt; 0) &amp; 0xFF;</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;            avgGreen += (colorInt &gt;&gt; 8) &amp; 0xFF;</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;            avgBlue += (colorInt &gt;&gt; 16) &amp; 0xFF;</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160; </div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;          }</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160; </div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;          <span class="keywordflow">if</span> (len &gt; 1)</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;          {</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;            <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> diffRed;</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;            <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> diffGreen;</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;            <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> diffBlue;</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160; </div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;            <span class="comment">// calculated average color information</span></div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;            avgRed   /= <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">&gt;</span> (len);</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;            avgGreen /= <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">&gt;</span> (len);</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;            avgBlue  /= <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">&gt;</span> (len);</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160; </div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;            <span class="comment">// iterate over points for differential encoding</span></div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;            <span class="keywordflow">for</span> (i = 0; i &lt; len; i++)</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;            {</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;              <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; idx = indexVector_arg[i];</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;              <span class="keyword">const</span> <span class="keywordtype">char</span>* idxPointPtr = <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><span class="keywordtype">char</span>*<span class="keyword">&gt;</span> (&amp;inputCloud_arg-&gt;points[idx]);</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;              <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; colorInt = *<span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><span class="keywordtype">int</span>*<span class="keyword">&gt;</span> (idxPointPtr+rgba_offset_arg);</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160; </div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;              <span class="comment">// extract color components and do XOR encoding with predicted average color</span></div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;              diffRed = (<span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (avgRed)) ^ <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (((colorInt &gt;&gt; 0) &amp; 0xFF));</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;              diffGreen = (<span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (avgGreen)) ^ <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (((colorInt &gt;&gt; 8) &amp; 0xFF));</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;              diffBlue = (<span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (avgBlue)) ^ <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (((colorInt &gt;&gt; 16) &amp; 0xFF));</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160; </div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;              <span class="comment">// remove least significant bits</span></div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;              diffRed = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (diffRed &gt;&gt; <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>);</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;              diffGreen = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (diffGreen &gt;&gt; <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>);</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;              diffBlue = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (diffBlue &gt;&gt; <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>);</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160; </div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;              <span class="comment">// add to differential color vector</span></div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;              <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a36b41d2a0802b6a6329950f942a712d4">pointDiffColorDataVector_</a>.push_back (<span class="keyword">static_cast&lt;</span><span class="keywordtype">char</span><span class="keyword">&gt;</span> (diffRed));</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;              <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a36b41d2a0802b6a6329950f942a712d4">pointDiffColorDataVector_</a>.push_back (<span class="keyword">static_cast&lt;</span><span class="keywordtype">char</span><span class="keyword">&gt;</span> (diffGreen));</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;              <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a36b41d2a0802b6a6329950f942a712d4">pointDiffColorDataVector_</a>.push_back (<span class="keyword">static_cast&lt;</span><span class="keywordtype">char</span><span class="keyword">&gt;</span> (diffBlue));</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;            }</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;          }</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160; </div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;          <span class="comment">// remove least significant bits from average color information</span></div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;          avgRed   &gt;&gt;= <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>;</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;          avgGreen &gt;&gt;= <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>;</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;          avgBlue  &gt;&gt;= <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>;</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160; </div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;          <span class="comment">// add to differential color vector</span></div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;          <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a4f325d7e0945c48a24a517f1593007e6">pointAvgColorDataVector_</a>.push_back (<span class="keyword">static_cast&lt;</span><span class="keywordtype">char</span><span class="keyword">&gt;</span> (avgRed));</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;          <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a4f325d7e0945c48a24a517f1593007e6">pointAvgColorDataVector_</a>.push_back (<span class="keyword">static_cast&lt;</span><span class="keywordtype">char</span><span class="keyword">&gt;</span> (avgGreen));</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;          <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a4f325d7e0945c48a24a517f1593007e6">pointAvgColorDataVector_</a>.push_back (<span class="keyword">static_cast&lt;</span><span class="keywordtype">char</span><span class="keyword">&gt;</span> (avgBlue));</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160; </div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;        }</div>
<div class="ttc" id="aclasspcl_1_1octree_1_1_color_coding_html_a36b41d2a0802b6a6329950f942a712d4"><div class="ttname"><a href="classpcl_1_1octree_1_1_color_coding.html#a36b41d2a0802b6a6329950f942a712d4">pcl::octree::ColorCoding::pointDiffColorDataVector_</a></div><div class="ttdeci">std::vector&lt; char &gt; pointDiffColorDataVector_</div><div class="ttdoc">Vector for storing differential color information</div><div class="ttdef"><b>Definition:</b> color_coding.h:396</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a8d21490cbca034aa34955d057ad6aa4e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d21490cbca034aa34955d057ad6aa4e">&#9670;&nbsp;</a></span>getBitDepth()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned char <a class="el" href="classpcl_1_1octree_1_1_color_coding.html">pcl::octree::ColorCoding</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::getBitDepth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieve color bit depth of encoded color information. </p>
<dl class="section return"><dt>返回</dt><dd>amounts of bits for representing one color component </dd></dl>
<div class="fragment"><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        {</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;          <span class="keywordflow">return</span> (<span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (8 - <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a>));</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ad9e6aec6eefe3d829e88e74c583bbee7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9e6aec6eefe3d829e88e74c583bbee7">&#9670;&nbsp;</a></span>setBitDepth()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1octree_1_1_color_coding.html">pcl::octree::ColorCoding</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::setBitDepth </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>bitDepth_arg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Define color bit depth of encoded color information. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">bitDepth_arg</td><td>amounts of bits for representing one color component </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        {</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;          <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a88e357725f69e7e8428869148667e3e3">colorBitReduction_</a> = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span><span class="keyword">&gt;</span> (8 - bitDepth_arg);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a2ec264bd32330ee64434dc19061f0c35"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ec264bd32330ee64434dc19061f0c35">&#9670;&nbsp;</a></span>setDefaultColor()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1octree_1_1_color_coding.html">pcl::octree::ColorCoding</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::setDefaultColor </td>
          <td>(</td>
          <td class="paramtype">PointCloudPtr&#160;</td>
          <td class="paramname"><em>outputCloud_arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>beginIdx_arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>endIdx_arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>rgba_offset_arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set default color to points </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">outputCloud_arg</td><td>output point cloud </td></tr>
    <tr><td class="paramname">beginIdx_arg</td><td>index indicating first point to be assiged with color information </td></tr>
    <tr><td class="paramname">endIdx_arg</td><td>index indicating last point to be assiged with color information </td></tr>
    <tr><td class="paramname">rgba_offset_arg</td><td>offset to color information </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;        {</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;          std::size_t i;</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;          <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pointCount;</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160; </div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;          assert (beginIdx_arg &lt;= endIdx_arg);</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160; </div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;          <span class="comment">// amount of points to be decoded</span></div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;          pointCount = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">&gt;</span> (endIdx_arg - beginIdx_arg);</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160; </div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;          <span class="comment">// iterate over points</span></div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;          <span class="keywordflow">for</span> (i = 0; i &lt; pointCount; i++)</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;          {</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;            <span class="keywordtype">char</span>* idxPointPtr = <span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">char</span>*<span class="keyword">&gt;</span> (&amp;outputCloud_arg-&gt;points[beginIdx_arg + i]);</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;            <span class="keywordtype">int</span>&amp; pointColor = *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">int</span>*<span class="keyword">&gt;</span> (idxPointPtr+rgba_offset_arg);</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;            <span class="comment">// assign color to point from point cloud</span></div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;            pointColor = defaultColor_;</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;          }</div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;        }</div>
</div><!-- fragment -->
</div>
</div>
<a id="af7a2fb98dd7f14d54685a875a5cd844e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7a2fb98dd7f14d54685a875a5cd844e">&#9670;&nbsp;</a></span>setPointCount()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1octree_1_1_color_coding.html">pcl::octree::ColorCoding</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::setPointCount </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>pointCount_arg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set amount of points within point cloud to be encoded and reserve memory </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">pointCount_arg</td><td>amounts of points within point cloud </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        {</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;          <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a36b41d2a0802b6a6329950f942a712d4">pointDiffColorDataVector_</a>.reserve (pointCount_arg * 3);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a9d0ecbbb1c331d4f234b496567c4952d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d0ecbbb1c331d4f234b496567c4952d">&#9670;&nbsp;</a></span>setVoxelCount()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1octree_1_1_color_coding.html">pcl::octree::ColorCoding</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::setVoxelCount </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>voxelCount_arg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set amount of voxels containing point color information and reserve memory </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">voxelCount_arg</td><td>amounts of voxels </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        {</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;          <a class="code" href="classpcl_1_1octree_1_1_color_coding.html#a4f325d7e0945c48a24a517f1593007e6">pointAvgColorDataVector_</a>.reserve (voxelCount_arg * 3);</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="aa9c009058b32bdac78ca7e6e5ff41d76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa9c009058b32bdac78ca7e6e5ff41d76">&#9670;&nbsp;</a></span>defaultColor_</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const int <a class="el" href="classpcl_1_1octree_1_1_color_coding.html">pcl::octree::ColorCoding</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::defaultColor_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>初始值:</b><div class="fragment"><div class="line">= ((255) &lt;&lt; 0) |</div>
<div class="line">                                                   ((255) &lt;&lt; 8) |</div>
<div class="line">                                                   ((255) &lt;&lt; 16)</div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>io/include/pcl/compression/<a class="el" href="color__coding_8h_source.html">color_coding.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><b>octree</b></li><li class="navelem"><a class="el" href="classpcl_1_1octree_1_1_color_coding.html">ColorCoding</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
